package com.airforce.controller;

import com.airforce.DIYinterface.Group;
import com.airforce.model.index_award;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "test")
public class ValidateController {


    @PostMapping("insert")
    public String insert(@Validated(value = Group.Default.class)index_award index_award){

            return "insert";
    }

    @PostMapping String updata(@Validated(value = Group.Update.class) index_award index_award){
        return "updata";
    }


}
